<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>欢迎登录后台管理系统</title>
		<link type="text/css" href="__PUBLIC__/admin/css/style.css" rel="stylesheet" />
		<style>
			*,button,input,select,textarea{font-family:"微软雅黑";}
			body{background-color:#1c77ac;background-image:url(__PUBLIC__/admin/image/light.png);background-repeat:no-repeat;
				background-position:center top; overflow:hidden;}
			.loginuser,.loginbtn{font-weight:normal;}
		</style>
	</head>
	<body>
		<div id="mainBody">
			<div id="cloud1" class="cloud"></div>
			<div id="cloud2" class="cloud"></div>
		</div>
		<form action="" method="post" onsubmit="return false;">
			<div class="loginbody">
				<span class="systemlogo" style="background:none;"></span>
				<div class="loginbox" style="margin-top:0;">
					<ul>
						<li>
							<input name="name" type="text" class="loginuser" value="" placeholder="用户名" onclick="JavaScript:this.value=''"/>
						</li>
						<li>
							<input name="pass" type="password" class="loginpwd" value="" placeholder="密码" onclick="JavaScript:this.value=''"/>
						</li>
						<li>
							<input type="button" class="loginbtn" id="queryButton" onclick="formSubmit(this)" value="登 录" />
							<!-- <label>
								<input name="" type="checkbox" value="" checked="checked" />
								记住密码</label><label><a href="javascript:alert('请联系技术人员');">忘记密码？</a></label> -->
						</li>
					</ul>
				</div>
			</div>
		</form>
		<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.1.min.js"></script>
	    <script type='text/javascript' src='__PUBLIC__/layer/layer.js'></script>
	    <script type='text/javascript' src='__PUBLIC__/admin/js/common.js'></script>
		<script type="text/javascript" src="__PUBLIC__/admin/js/cloud.js"></script>
		<script language="javascript">
			$(function() {
				$('.loginbox').css({
					'position' : 'absolute',
					'top' : (($(document).height() - 380) / 2),
					'left' : (($(document).width() - 692) / 2)
				});
				$(window).resize(function() {
					$('.loginbox').css({
						'position' : 'absolute',
						'top' : (($(document).height() - 380) / 2),
						'left' : (($(document).width() - 692) / 2)
					});
				})
			});

			//登录操作
			function formSubmit(obj){
			    $.post(
			        "<{:U('Admin/Customer/login')}>",
			        {name : $("input[name='name']").val(), pass : $("input[name='pass']").val()},
			        function(res){
			            if(res.status==1){
			                note_info('登录成功',obj);
			                setTimeout("location.href='"+res.info+"'", 800);
			            }else{
			                note_info(res.info,obj,'warn');
			            }
			        },
			        'json'
			    );
			}

			//输入框的回车事件
			$(function(){
				$("input[name=pass], input[name=name]").keypress(function(event){
					if(event.keyCode=='13'){
						$('#queryButton').click();
					}
				});
			}); 
		</script>
	</body>
</html>